FrameElement

interface FrameElement : Element

An HTML DOM frame or iframe element.

Properties

Link copied to clipboard

Returns HTML attributes of this element.

Link copied to clipboard

Returns a string with the HTML content of this element, or an empty string if the element does not have inner HTML.

Link copied to clipboard

Returns a string with the content of the element and its descendants, or an empty string if this element does not have a content.

Link copied to clipboard

Returns the next node in the document tree, if any.

Link copied to clipboard

Returns a string with the HTML serialization of this element and its descendants.

Link copied to clipboard

Returns the parent of this node, if any.

Link copied to clipboard

Returns the previous node in the document tree, if any.

Link copied to clipboard

Returns XPathExpression that represents path to this Node, or an empty expression if it is not available.

Functions

Link copied to clipboard
abstract fun addEventListener(eventType: EventType, listener: Observer<Event>, useCapture: Boolean)
Adds the given listener to the event target.
Link copied to clipboard
abstract fun appendChild(childNode: Node): Boolean
Adds the given node as a child of the current node to the end of its children list.
Link copied to clipboard
Returns HTML attributes of this element.
Link copied to clipboard
abstract fun blur()
Removes keyboard focus from the current element.
Link copied to clipboard
abstract fun boundingClientRect(): Rect
Returns the rectangle bounds of the element and its position relative to the top-left of the viewport of the current document.
Link copied to clipboard
abstract fun children(): List<Node>
Returns an immutable list of all children of this node.
Link copied to clipboard
abstract fun click()
Simulates a click on the node.
Link copied to clipboard
abstract fun close()
Closes this node.
Link copied to clipboard
abstract fun compareDocumentPosition(otherNode: Node): Set<DocumentPosition>
Compares position of the current node against another node in a DOM tree.
Link copied to clipboard
Returns an Optional that contains the document of the current FRAME/IFRAME element if it exists, otherwise an empty Optional.
Link copied to clipboard
abstract fun dispatch(event: Event): Boolean
Dispatches the given event at the current event target.
Link copied to clipboard
abstract fun document(): Document
Returns the Document instance of this node.
Link copied to clipboard
abstract fun evaluate(expression: String): XPathResult
Evaluates the given XPath expression for the node and returns the XPathResult of the ANY type.
abstract fun evaluate(expression: String, type: XPathResultType): XPathResult
Evaluates the given XPath expression for the node and returns the XPathResult object of the given type.
Link copied to clipboard

Evaluates the given expression for the node and returns XPathResult of the XPathResultType.ANY type.

fun Node.evaluate(expression: XPathExpression, type: <Error class: unknown class>): XPathResult
fun Node.evaluate(expression: XPathExpression, type: <Error class: unknown class>): XPathResult

Evaluates the given expression for the node and returns XPathResult of the given type.

Link copied to clipboard
abstract fun eventListeners(eventType: EventType, useCapture: Boolean): List<Observer<Event>>
Returns the immutable list of event listeners that listen events of the given eventType in a phase that corresponds the given useCapture.
Link copied to clipboard

Returns the first Element found in the current search context by the given className, if any.

Link copied to clipboard

Returns the first Element found in the current search context by the given cssSelector, if any.

Link copied to clipboard

Returns the first Element found in the current search context by the given id, if any.

Link copied to clipboard

Returns the first Element found in the current search context by the given name, if any.

Link copied to clipboard

Returns the first Element found in the current search context by the given tagName, if any.

Link copied to clipboard
abstract fun findElementByClassName(className: String): Optional<Element>
Returns the first Element object found in the current search context by the given className.
Link copied to clipboard
abstract fun findElementByCssSelector(cssSelector: String): Optional<Element>
Returns the first Element object found in the current search context by the given cssSelector.
Link copied to clipboard
Returns the first Element object found in the current search context by the given id.
Link copied to clipboard
Returns the first Element object found in the current search context by the given name.
Link copied to clipboard
abstract fun findElementByTagName(tagName: String): Optional<Element>
Returns the first Element object found in the current search context by the given tagName.
Link copied to clipboard
abstract fun findElementsByClassName(className: String): List<Element>
Returns an immutable list of the Element objects found in the current search context by the given className.
Link copied to clipboard
abstract fun findElementsByCssSelector(cssSelector: String): List<Element>
Returns an immutable list of the Element objects found in the current search context by the given cssSelector.
Link copied to clipboard
abstract fun findElementsById(id: String): List<Element>
Returns an immutable list of the Element objects found in the current search context by the given id.
Link copied to clipboard
abstract fun findElementsByName(name: String): List<Element>
Returns an immutable list of the Element objects found in the current search context by the given name.
Link copied to clipboard
abstract fun findElementsByTagName(tagName: String): List<Element>
Returns an immutable list of the Element objects found in the current search context by the given tagName.
Link copied to clipboard
abstract fun focus()
Sets focus on this element, if it can be focused.
Link copied to clipboard

Returns the first Element found in the current search context by the given className.

Link copied to clipboard

Returns the first Element found in the current search context by the given cssSelector.

Link copied to clipboard

Returns the first Element found in the current search context by the given id.

Link copied to clipboard

Returns the first Element found in the current search context by the given name.

Link copied to clipboard

Returns the first Element found in the current search context by the given tagName.

Link copied to clipboard
abstract fun innerHtml(): String
Returns a string with the HTML content of this element, or an empty string if the element does not have inner HTML.
abstract fun innerHtml(html: String): Boolean
Replaces the HTML content of this element with the given html.
Link copied to clipboard
abstract fun innerText(): String
Returns a string with the text content of the element and its descendants.
abstract fun innerText(innerText: String): Boolean
Replaces the text content of the element with the given innerText value.
Link copied to clipboard
abstract fun insertChild(node: Node, beforeNode: Node): Boolean
Inserts the given node before the given beforeNode as a child of the current node.
Link copied to clipboard
abstract fun nextSibling(): Optional<Node>
Returns an Optional that contains the next node in the document tree if such a node exists, otherwise returns an empty Optional.
Link copied to clipboard
abstract fun nodeName(): String
Returns a string that represents the node name in the UTF8 format.
Link copied to clipboard
abstract fun nodeValue(): String
Returns a string that represents the node value.
abstract fun nodeValue(value: String)
Updates the node value with the given new value.
Link copied to clipboard
abstract fun outerHtml(): String
Returns a string with the HTML serialization of this element and its descendants.
abstract fun outerHtml(html: String): Boolean
Replaces the element and all of its descendants with a new DOM tree constructed by parsing the given html.
Link copied to clipboard
abstract fun parent(): Optional<Node>
Returns an Optional that contains the parent of this node.
Link copied to clipboard
abstract fun previousSibling(): Optional<Node>
Returns an Optional that contains the previous node in the document tree if such a node exists, otherwise returns an empty Optional.
Link copied to clipboard
abstract fun removeChild(childNode: Node): Boolean
Removes the given childNode of the current node from the DOM.
Link copied to clipboard
abstract fun removeEventListener(eventType: EventType, listener: Observer<Event>, useCapture: Boolean)
Removes the given listener from the event target.
Link copied to clipboard
abstract fun replaceChild(newNode: Node, oldNode: Node): Boolean
Replaces the given child oldNode of the current node with the given newNode.
Link copied to clipboard
abstract fun scrollIntoView(alignTo: Element.AlignTo)
Scrolls the element's parent container such that the element on which this method is called is visible to the user.
Link copied to clipboard
abstract fun textContent(): String
Returns the text content of the current node and its descendants.
abstract fun textContent(textContent: String)
Removes all the current node children and replaces them with a single text node with the given textContent.
Link copied to clipboard
abstract fun type(): NodeType
Returns the node type.
Link copied to clipboard
abstract fun xPath(): String
Returns a string that represents XPath to the current Node or an empty string if it is not available.